package com.zhonghui.dolo.manager.dao.impl;

import com.zhonghui.dolo.manager.dao.RoleModuleDao;
import com.zhonghui.dolo.manager.dao.mapper.RoleModuleMapper;
import com.zhonghui.dolo.manager.model.RoleModule;
import com.zhonghui.dolo.manager.model.RoleModuleExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class RoleModuleDaoImpl implements RoleModuleDao {

    @Autowired
    private RoleModuleMapper roleModuleMapper;

    @Override
    public List<RoleModule> queryRoleModuleListByRoleId(Integer roleId) {
        RoleModuleExample example = new RoleModuleExample();
        example.createCriteria().andRoleIdEqualTo(roleId);
        return roleModuleMapper.selectByExample(example);
    }
}
